<?php

include_once '../tools/common.php';
include_once '../tools/DbTools.php';
$is_login = getLoginStatus();
if(!$is_login){
    echo '尚未登入，<a href="../user/loginUi.php">请登入</a>';
    die;
}else{
    session_start();
    $userInfo = $_SESSION[$_COOKIE['Token']];
    $cardId = $userInfo['CardId'];
    DbTools::InitDb();
    $sql = "select CardMoney from bankcard where CardId = ".$cardId;
    $result = DbTools::select($sql);
    //关闭连接
    DbTools::close();
    $money = $result[0]['CardMoney'];
}



?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>取款</title>
</head>
<body>
<p><a href="../user/userInfo.php">回到用户中心</a></p>
<form action="moneyInAction.php" method="post">
    当前余额：<input type="text" name="now_money" id="" value="<?php echo $money;?>" readonly="readonly" disabled="disabled" /><br />
    存钱金额：<input type="text" name="in_money" id="" value="" />
    <br />
    <input type="submit" value="提交"/>
</form>

</body>
</html>
